﻿#ifndef TOOLBARJOYSTICK_H
#define TOOLBARJOYSTICK_H

#include <QToolBar>

class Joystick3D;

class ToolBarJoystick : public QToolBar
{
    Q_OBJECT
public:
    ToolBarJoystick(QWidget *parent = Q_NULLPTR);

    /**
     * @brief attach 绑定一个 Joystick3D 对象，同时允许 Joystick3D 的所有控制方式。
     * @param joystick
     */
    void attach(Joystick3D *joystick);
signals:
    void enableSignal(bool);
    void enableXYSignal(bool);
    void enableZSignal(bool);
    void enableButtionSignal(bool);
public:
    QAction *actionJoystick;
    QAction *actionXYEnable;
    QAction *actionZEnable;
    QAction *actionButtonsEnable;

    void initContent();
    void initConnection();
};

#endif // TOOLBARJOYSTICK_H
